FROM golang:alpine AS development
WORKDIR $GOPATH/src/test
COPY . .
RUN go build -o test

FROM alpine:latest AS production
WORKDIR /root/test/
COPY --from=development /go/src/test .
EXPOSE 8000
ENTRYPOINT ["./test"]